package com.lc.pianostudent.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2018/2/22.
 */
@HttpInlet(Conn.SENDRESETPASSWORDSMS)
public class SendResetPassword extends BaseAsyPost {

    public String username;//1用户注册

    public SendResetPassword(AsyCallBack asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected SendResetPasswordInfo parser(JSONObject object) throws Exception {

        if (object.optString("code").equals("200")) {

            SendResetPasswordInfo info = new SendResetPasswordInfo();


            info.message = object.optString("message");

            info.code = object.optString("code");

            TOAST = object.optString("message");

            return info;

        } else {

            TOAST = object.optString("message");

        }

        return null;
    }

    public static class SendResetPasswordInfo {

        public String message,code;

    }
}
